package com.csust.automaticteach.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.csust.automaticteach.model.dto.generatequestion.AddGenerateQuestionRequest;
import com.csust.automaticteach.model.dto.generatequestion.GenerateQuestionQueryDTO;
import com.csust.automaticteach.model.dto.generatequestion.JudgeGenerateQuestionRequest;
import com.csust.automaticteach.model.entity.Exercises;
import com.csust.automaticteach.model.entity.GenerateQuestion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.csust.automaticteach.model.entity.User;
import com.csust.automaticteach.model.vo.generatequestion.GenerateQuestionPageVO;
import com.csust.automaticteach.model.vo.generatequestion.GenerateQuestionVO;
import com.csust.automaticteach.model.vo.generatequestion.JudgeGenerateQuestionVO;

import javax.management.Query;
import java.util.List;

/**
* @author 钰玟
* @description 针对表【t_generate_question(题目生成)】的数据库操作Service
* @createDate 2025-06-20 10:52:44
*/
public interface GenerateQuestionService extends IService<GenerateQuestion> {
    /**
     * 将实体类转化为VO List
     * @param generateQuestion 实体类
     * @return  vo
     */
    List<GenerateQuestionVO> getGenerateQuestionVOList(GenerateQuestion generateQuestion);


    /**
     * 生成题目 重构后的数据结构
     * @param addGenerateQuestionRequest 生成题目请求
     * @param loginUser 登录用户
     * @return vo
     */
    List<Exercises> getGenerateQuestionRefactoring(AddGenerateQuestionRequest addGenerateQuestionRequest, User loginUser);

    /**
     * 生成题目
     * @param addGenerateQuestionRequest 生成题目请求
     * @param loginUser 登录用户
     * @return vo
     */
    List<GenerateQuestionVO> getGenerateQuestion(AddGenerateQuestionRequest addGenerateQuestionRequest, User loginUser);

    /**
     * 判断题是否正确
     * @param judgeGenerateQuestionRequest 判断题请求
     * @return vo
     */
    List<JudgeGenerateQuestionVO> judgeGenerateQuestion(JudgeGenerateQuestionRequest judgeGenerateQuestionRequest);

    /**
     * 得到查询的Wrapper
     * @param generateQuestionQueryDTO 查询条件
     * @return queryWrapper
     */
    QueryWrapper<GenerateQuestion> getGenerateQuestionQueryWrapper(GenerateQuestionQueryDTO generateQuestionQueryDTO);

    /**
     * 将实体类转化为VO
     * @param records 实体类
     * @return  vo
     */
    List<GenerateQuestionPageVO> getGenerateQuestionPageVOList(List<GenerateQuestion> records);



}
